<%@ page language="java" contentType="text/html; charset=UTF-8"
	import="com.sun.org.apache.bcel.internal.generic.NEW,java.text.SimpleDateFormat,java.util.Date,java.sql.ResultSet,java.text.ParseException,java.text.SimpleDateFormat,com.zhida84.Dao.ShowDetailDao,com.zhida84.Impl.ShowDetailImpl"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta name="author" content="shangzhengbo&sunchangxing" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport"
	content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
<title>美食推荐</title>
<script type="text/javascript">
/**
	function onBridgeReady() {
		WeixinJSBridge.call('hideOptionMenu');
	}
	if (typeof WeixinJSBridge == "undefined") {
		if (document.addEventListener) {
			document.addEventListener('WeixinJSBridgeReady', onBridgeReady,
					false);
		} else if (document.attachEvent) {
			document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
			document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
		}
	} else {
		onBridgeReady();
	}
	// 对浏览器的UserAgent进行正则匹配，不含有微信独有标识的则为其他浏览器
	var useragent = navigator.userAgent;
	if (useragent.match(/MicroMessenger/i) != 'MicroMessenger') {
		// 这里警告框会阻塞当前页面继续加载
		var opened = window.open('about:blank', '_self');
		opened.opener = null;
		opened.close();
		window.location.href = "../error/wechat.html"
	}*/
</script>
<link href="../css/showinformation.css" type="text/css" rel="stylesheet">
<link href="../css/A-emoji.css" type="text/css" rel="stylesheet">
<link href="../css/myemojiPl.css" type="text/css" rel="stylesheet">
<script src="../js/applylead.js"></script>
<script src="../js/jquery-2.1.1.min.js"></script>
<link href="../css/alertMsg.css" type="text/css" rel="stylesheet">
<style type="text/css">
/*重新定位*/
.whiteBack li {
	border-bottom: 1px solid gainsboro;
	padding-top: 0px !important;
}

body {
	font-size: 14em;
	font-family: "微软雅黑"
}

.f5 {
	padding-top: 10px !important;
}

.place b strong {
	font-size: 17px !important;
}


.registTitle {
	width: 100%;
	height: 50px;
	background: #E77817;
	color: #ffffff;
	border-bottom: 1px solid #E5D8D8;
}

.registLeft {
	width: 12%;
	height: 50px;
	background: url(../images/headsearch/arr_left.png) no-repeat 30%;
	background-size: 41%;
	float: left;
}

.registTitle span {
	width: 71%;
	height: 50px;
	text-align: center;
	font-size: 2em;
	line-height: 50px;
	display: block;
	font-family: "微软雅黑";
	font-weight: bold;
	float: left;
}

.registRight {
	float: left;
	background: url(../images/headsearch/homeo.png) no-repeat 56%;
	background-size: 65%;
}

.registCollectionRight {
	float: left;
	background: url(../images/headsearch/homeo.png) no-repeat 56%;
	background-size: 65%;
}

</style>
</head>

<body>
	<%
		Integer id = Integer.parseInt(request.getParameter("/scx/123szb"));
		if (null == id){
			return;
		}
		ShowDetailDao show = new ShowDetailImpl();
		ResultSet rs = show.showAll(id);
		while (rs.next()) {
			System.out.println(rs.getString("jobName"));
	%>
	<%
		SimpleDateFormat sf = new SimpleDateFormat(
					"yyyy-MM-dd HH:mm:ss");
			String start = rs.getString("reStart");
			String end = rs.getString("reEnd");
			if (null != end && null != start) {
				String startjob = start.substring(10, 16);
				String startday = start.substring(0, 10);
				String endday = end.substring(0, 10);
				String endjob = end.substring(10, 16);
				Long c = null;
				c = sf.parse(end).getTime() - sf.parse(start).getTime();
				long hour = c / 1000 / 60 / 60;//天
				long min = c / 1000 / 60 % 60;
				String startTime = start.substring(0, 10);
			}
			
	%>
	<input type="hidden" id="recruitId" value="<%=id%>">
	<jsp:include page="../Share/top_detail_back.jsp"></jsp:include>
	<script type="text/javascript">
		$("#alltitle").html("美食推荐");
		function backhistory() {
			window.history.go(-1);
		}
	</script>
	
	<div class="whiteBack">
		<ul id="DataList">
			<li>
				<div class="a_left">
					<div class="ico">
						<img src="../images/menu/<%=rs.getString("reType")%>" />
					</div>
				</div>
				<div class="a_right" style="border-bottom: none;">
					<h2>
					    <%=rs.getString("jobName")%>
					   
					</h2>
					<p class="place">
						<em class="a_right local"
							style="border-bottom: none; background: none; width: 10%; padding-left: 4%; margin-right: 0;"></em><em
							style='background: none; padding-left: 5%;'></em> 
					</p>
				</div>
			</li>
		</ul>
	</div>
	<div >
		<div style="width: 100%;height: 30px;line-height: 20px;font-family: '微软雅黑';border-bottom: 1px solid #EFEFEF;font-size: 18px">介&nbsp;绍</div>
		<div id="main"> 
        <div id="content"></div> 
        <br style="clear:both;" />
		    <div class="f5">
		          <div style="font-size: 15px; font-weight: bold">食材清单：</div>
		          <%=rs.getString("jobInfo")%>
		    </div>
			<div class="f5">
			  <div style="font-size: 15px; font-weight: bold">烹饪步骤：</div>
			  <%=rs.getString("reRequest")%>
			</div>
		</div>
	</div>
	<p class="overline"></p>
	<br>
	
	<div>
	<div style="width: 100%;height: 30px;line-height: 20px;font-family: '微软雅黑';border-bottom: 1px solid #EFEFEF;font-size: 18px">注&nbsp;意</div>
    <div id="main"> 
        <div id="content"></div> 
        <br style="clear:both;" />
        <div class="f5">
		    <div style="font-size: 15px; font-weight: bold">营养价值：</div>
		    &nbsp;&nbsp;&nbsp;<%=rs.getString("payment")%>
		</div>	 
		<div class="f5">
            <div style="font-size: 15px; font-weight: bold">适用人群：</div>
		    &nbsp;&nbsp;&nbsp;<%=rs.getString("requireNum")%>
		</div>	 
		<div class="f5">
			<div style="font-size: 15px; font-weight: bold">小贴士：</div>
		    &nbsp;&nbsp;&nbsp;<%=rs.getString("orSalary")%>
		</div>
    </div>
	</div>
	<p class="overline"></p>
	<br>
	
	<div style="height:300px; ">
		<div style="width: 100%;height: 30px;line-height: 20px;font-family: '微软雅黑';border-bottom: 1px solid #EFEFEF;font-size: 18px">评&nbsp;论</div>
	<%
	

		}
		Cookie[] cookies = request.getCookies();
		Integer userId = null;
		if (cookies == null) {
			return;
		}
		for (Cookie c : cookies) {
			if (c.getName().equals("userId"))
			{
				userId = Integer.valueOf(c.getValue());
			}
		}
		ResultSet rs1 = show.showMsgAll(id, userId);
		while(rs1.next()) {
	%>
			<div class="commentBox">
				<div class="name" style="padding-left: 4px;">
					 <%=rs1.getString("userReName")%>
				</div>
				<div class="text" style="padding-left: 10px;">
					<%=rs1.getString("contentInfo")%>
				</div>
			</div>
		
	<%
		}
	%>
	</div>
	<div class="box footer">
		<div class="InputBox">
			<div class="input">    
				<div contenteditable="true" class="text" id="msgContent"></div>                      
				<div class="btnGroup">
					<div onclick="sendMsg()" class="txtinput1 btnregist1 btnlastlogin1">发&nbsp;送</div>
				</div>      
			</div>
		</div>		
	</div>
	
</body>
<script type="text/javascript">
/**
 * 收藏
 */
var collection = function () {
	var recruitId = $("#recruitId").val();
	$.ajax({
		type : "POST", // 请求方式
		url : "collectionInfo.html", // 请求路径
		data : {recruitId : recruitId},
		cache : false,
		dataType : 'text', // 返回值类型
		success : function(msg) {
			alert(msg);
		},
		error : function() {
			alert("系统异常!");
		}

	});
}

	
</script>
</html>